import request from '@/utils/request'

// 查询會計記賬分錄列表
export function listEntry(query) {
  return request({
    url: '/biz/entry/list',
    method: 'get',
    params: query
  })
}

// 查询會計記賬分錄详细
export function getEntry(id) {
  return request({
    url: '/biz/entry/' + id,
    method: 'get'
  })
}

// 新增會計記賬分錄
export function addEntry(data) {
  return request({
    url: '/biz/entry',
    method: 'post',
    data: data
  })
}

// 修改會計記賬分錄
export function updateEntry(data) {
  return request({
    url: '/biz/entry',
    method: 'put',
    data: data
  })
}

// 删除會計記賬分錄
export function delEntry(id) {
  return request({
    url: '/biz/entry/' + id,
    method: 'delete'
  })
}


// 獲取會計
export function getAccountSubjectTree() {
  return request({
    url: '/system/dict/data/accountSubjectTree',
    method: 'get'
  })
}
// 獲取會計
export function getAccountAssetsLiabilities(query) {
  return request({
    url: '/biz/entry/accounting/assetsLiabilities/view',
    method: 'get',
    params: query
  })
}
export function getAccountAssetsLiabilitiesExport(query) {
  return request({
    url: '/biz/entry/accounting/assetsLiabilities/export',
    method: 'get',
    params: query
  })
}
export function getAccountIncomeStatement(query) {
  return request({
    url: '/biz/entry/accounting/incomeStatement/view',
    method: 'get',
    params: query
  })
}
export function getAccountCashFlowStatement(query) {
  return request({
    url: '/biz/entry/accounting/cashFlowStatement/view',
    method: 'get',
    params: query
  })
}
export function postEntryConfirm(data) {
  return request({
    url: '/biz/entry/confirm',
    method: 'post',
    data: data
  })
}
export function postEntryStatistics(data) {
  return request({
    url: '/biz/entry/statistics',
    method: 'post',
    data: data
  })
}
